/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * JRocketStartSimulatorFrame.java
 *
 * Created on 07.01.2009, 18:55:06
 */

package jrocketstartsimulator;

import java.util.ResourceBundle;

/**
 *
 * @author uli
 */
public class JRocketStartSimulatorFrame extends javax.swing.JFrame {

    /** Creates new form JRocketStartSimulatorFrame */
    public JRocketStartSimulatorFrame() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        rocketWeightLabel = new javax.swing.JLabel();
        fuelWeightLabel = new javax.swing.JLabel();
        fuelEmissionLabel = new javax.swing.JLabel();
        fuelVelocityLabel = new javax.swing.JLabel();
        gravityLabel = new javax.swing.JLabel();
        okButton = new javax.swing.JButton();
        gravityField = new javax.swing.JFormattedTextField();
        fuelVelocityField = new javax.swing.JFormattedTextField();
        fuelEmissionField = new javax.swing.JFormattedTextField();
        fuelWeightField = new javax.swing.JFormattedTextField();
        rocketWeightField = new javax.swing.JFormattedTextField();
        resolutionLabel = new javax.swing.JLabel();
        gravityField1 = new javax.swing.JFormattedTextField();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle( i18n.getString("JRocketStartSimulatorFrame.title")); // NOI18N

        rocketWeightLabel.setText( i18n.getString("JRocketStartSimulatorFrame.rocketWeightLabel.text")); // NOI18N

        fuelWeightLabel.setText( i18n.getString("JRocketStartSimulatorFrame.fuelWeightLabel.text")); // NOI18N

        fuelEmissionLabel.setText( i18n.getString("JRocketStartSimulatorFrame.fuelEmissionLabel.text")); // NOI18N

        fuelVelocityLabel.setText( i18n.getString("JRocketStartSimulatorFrame.fuelVelocityLabel.text")); // NOI18N

        gravityLabel.setText( i18n.getString("JRocketStartSimulatorFrame.gravityLabel.text")); // NOI18N

        okButton.setText( i18n.getString("JRocketStartSimulatorFrame.okButton.text")); // NOI18N
        okButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                okButtonMouseClicked(evt);
            }
        });

        gravityField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("########0.##################### m/s²"))));
        gravityField.setText( i18n.getString("JRocketStartSimulatorFrame.jFormattedTextField1.text")); // NOI18N

        fuelVelocityField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("#,##0.### m/s"))));

        fuelEmissionField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("########0.##################### kg/s"))));

        fuelWeightField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("########0.##################### kg"))));

        rocketWeightField.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat(""))));

        resolutionLabel.setText( i18n.getString("JRocketStartSimulatorFrame.resolutionLabel.text")); // NOI18N

        gravityField1.setFormatterFactory(new javax.swing.text.DefaultFormatterFactory(new javax.swing.text.NumberFormatter(new java.text.DecimalFormat("########0.##################### m/s²"))));
        gravityField1.setText( i18n.getString("JRocketStartSimulatorFrame.gravityField1.text")); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(okButton, javax.swing.GroupLayout.DEFAULT_SIZE, 379, Short.MAX_VALUE)
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(gravityLabel)
                            .addComponent(fuelWeightLabel)
                            .addComponent(rocketWeightLabel)
                            .addComponent(fuelVelocityLabel)
                            .addComponent(fuelEmissionLabel)
                            .addComponent(resolutionLabel))
                        .addGap(12, 12, 12)
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(gravityField1, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE)
                            .addComponent(fuelWeightField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE)
                            .addComponent(rocketWeightField, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE)
                            .addComponent(fuelEmissionField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE)
                            .addComponent(fuelVelocityField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE)
                            .addComponent(gravityField, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE))))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rocketWeightLabel)
                    .addComponent(rocketWeightField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(fuelWeightLabel)
                    .addComponent(fuelWeightField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(fuelEmissionLabel)
                    .addComponent(fuelEmissionField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(fuelVelocityLabel)
                    .addComponent(fuelVelocityField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(7, 7, 7)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(gravityField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(gravityLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(gravityField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(resolutionLabel))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(okButton)
                .addContainerGap(17, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void okButtonMouseClicked(java.awt.event.MouseEvent evt)//GEN-FIRST:event_okButtonMouseClicked
    {//GEN-HEADEREND:event_okButtonMouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_okButtonMouseClicked

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new JRocketStartSimulatorFrame().setVisible(true);
            }
        });
    }


    private ResourceBundle i18n = ResourceBundle.getBundle("jrocketstartsimulator/Bundle"); //NOI18N
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JFormattedTextField fuelEmissionField;
    private javax.swing.JLabel fuelEmissionLabel;
    private javax.swing.JFormattedTextField fuelVelocityField;
    private javax.swing.JLabel fuelVelocityLabel;
    private javax.swing.JFormattedTextField fuelWeightField;
    private javax.swing.JLabel fuelWeightLabel;
    private javax.swing.JFormattedTextField gravityField;
    private javax.swing.JFormattedTextField gravityField1;
    private javax.swing.JLabel gravityLabel;
    private javax.swing.JButton okButton;
    private javax.swing.JLabel resolutionLabel;
    private javax.swing.JFormattedTextField rocketWeightField;
    private javax.swing.JLabel rocketWeightLabel;
    // End of variables declaration//GEN-END:variables

}
